/******************************************************************************/
#include "stdafx.h"
#include "Main.h"
/******************************************************************************/
ClientServer Server;
/******************************************************************************/
I64 ClientServer::bytesSentTotal    () {I64 x=bytes_sent    ; REPA(clients)x+=client(i).connection.sent    (); return x;}
I64 ClientServer::bytesReceivedTotal() {I64 x=bytes_received; REPA(clients)x+=client(i).connection.received(); return x;}
/******************************************************************************/
void ClientServer::update()
{
   // update server and connections
   super::update();

   // misc
   MAX(clients_peak, clients.elms());

   // now when all clients have multiple data chunks queued in their 'connection' ready to be sent, send them all together
   REPA(clients)client(i).connection.send();
}
/******************************************************************************/
